/**
 * 连接管理器，存放所有tcp连接
 * @author: wangjian@ruiboyun.net
 */
#ifndef CONNECTIONS_HPP
#define CONNECTIONS_HPP

#include <unordered_map>
#include <string>
#include "client.hpp"

class Connections {
public:
    int insert(std::string key, Client conn);
    int erase(std::string key);
    Client get(std::string key);
    size_t size();

private:
    std::unordered_map<std::string, Client> connectionsMap;
};

#endif